package com.castle.fortress.admin.cms.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.castle.fortress.admin.cms.dto.CmsChannelAuditDto;
import com.castle.fortress.admin.cms.entity.CmsChannelAuditEntity;

import java.util.List;
import java.util.Map;

/**
 * cms栏目审核配置表 服务类
 *
 * @author castle
 * @since 2022-03-23
 */
public interface CmsChannelAuditService extends IService<CmsChannelAuditEntity> {

    /**
     * 分页展示cms栏目审核配置表列表
     * @param page
     * @param cmsChannelAuditDto
     * @return
     */
    IPage<CmsChannelAuditDto> pageCmsChannelAudit(Page<CmsChannelAuditDto> page, CmsChannelAuditDto cmsChannelAuditDto);


    /**
     * 展示cms栏目审核配置表列表
     * @param cmsChannelAuditDto
     * @return
     */
    List<CmsChannelAuditDto> listCmsChannelAudit(CmsChannelAuditDto cmsChannelAuditDto);

    /**
     * 移除该栏目的审核人员
     * @param channelId
     */
    void removeByChannelId(Long channelId);

    /**
     * 移除栏目集合的审核人员
     * @param channelIds
     */
    void removeByChannelIds(List<Long> channelIds);

    /**
     * 查询栏目的审核人员 包括该栏目的审核人员及该栏目的所有父级审核人员
     * @param channelId
     * @return
     */
    List<Map<String,Object>> getAuditorByChannelId(Long channelId);

    /**
     * 将指定栏目下的子集的审核人员都删除
     * @param id
     */
    void removeByParentId(Long id);
}
